<template>
  <div class="dashboard-container">
    <div class="dashboard-text">name: 小胡老了成了老胡</div>
    <el-button type="danger" @click="btnHandler">
      小胡摊手
    </el-button>
    <hr>
    <dia :visible.sync="dialogVisible" />
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import dia from './dia.vue'

export default {
  name: 'Dashboard',
  components: {
    dia
  },
  data() {
    return {
      dialogVisible: false

    }
  },
  computed: {
    ...mapGetters([
      'name'
    ])
  },
  methods: {
    btnHandler() {
      this.dialogVisible = !this.dialogVisible
      console.log(this.dialogVisible)
    }
  }
}
</script>

<style lang="scss" scoped>
.dashboard {
  &-container {
    margin: 30px;
  }
  &-text {
    font-size: 30px;
    line-height: 46px;
  }
}
</style>
